[PATCH] src: fix possible dereference of null pointer
authorEusgor <100363036+Eusgor@users.noreply.github.com>
Thu, 29 May 2025 20:01:48 +0000 (02:01 +0600)
committerJérémy Lal <kapouer@melix.org>
Tue, 24 Mar 2026 21:11:25 +0000 (22:11 +0100)
commit47edeff94f9429cb4b8096038967cf921f646ebc
tree8c6731e00a01f6636724cd04617144a719e3d204
parent18ca3b6a58e94f246dfb81346be120789cc76dd2
[PATCH] src: fix possible dereference of null pointer

There is a CHECK_NOT_NULL check before dereferencing node_env on
line 710 in the "if" block, but there is no CHECK_NOT_NULL check before
dereferencing node_env on line 721. Maybe it makes sense to put
CHECK_NOT_NULL right after calling the Environment::GetCurrent function.

PR-URL: https://github.com/nodejs/node/pull/58459
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Gbp-Pq: Topic sec
Gbp-Pq: Name 17-fix-possible-dereference-of-null-pointer.patch
src/node_api.cc